package com.jsx.nativelibs.ffmpeg

import android.util.Log
import kotlin.math.log

class Ffmpeg60 {
    companion object {
        init {
            System.loadLibrary("ffpmeg60")
        }

        fun test(): String {

            val ffmpeg60 = Ffmpeg60()
            val allEncoders = ffmpeg60.getAllEncoders()
            Log.i("Ffmpeg60", allEncoders)

            return ffmpeg60.getVersion() + ":" + ffmpeg60.init(100, 100, 10000, 25, 100)
        }

    }

    private external fun getAllEncoders(): String
    private external fun getVersion(): String

    private external fun init(
        width: Int,
        height: Int,
        bitRate: Int,
        fps: Byte,
        groupSize: Int
    ): Long

    private external fun destroy(context: Long)
    private external fun encoderOneFrameByARGB(context: Long, inBuff: ByteArray, outBuff: ByteArray)

}